home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5096 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.1 KB

  1. Path: news2.ios.com!usenet
  2. From: vlad@gramercy.ios.com (Vlastimil Adamovsky)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Pointers to member functions HOW?
  5. Date: Fri, 02 Feb 1996 14:49:13 GMT
  6. Organization: Internet Online Services
  7. Message-ID: <4et7ns$1ur@news2.ios.com>
  8. References: <31067074.6B53@compuserve.com> <4e9nh8$iji@news2.ios.com> <31113B7A.4C82@usinternet.com>
  9. NNTP-Posting-Host: ppp-38.ts-7.hck.idt.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. Scott Jibben <sjibben@usinternet.com> wrote:
  13.  
  14. >Vlastimil Adamovsky wrote:
  15. >> 
  16. >>  1) you cannot cast member function to non-member. It is nonsense
  17.  
  18. >You can if the method is declared as static:
  19.  
  20. >class TTest {
  21. >public:
  22. >       static void MemberFunction(int iVal)
  23. >       {
  24. >               printf("[%d]\n", iVal);
  25. >       };
  26. >};
  27.  
  28. It is correct. But "static member function" is not a real member
  29. function. It is some kind of "convenience to call it so.
  30. *******************************************
  31. *    Vlastimil Adamovsky                  *
  32. * Smalltalk, C++ and Envelop development  *
  33. *******************************************
  34.  
  35.